#define _GNU_SOURCE
#include "fastxml.h"

int main() {
    printf("测试简单XML解析...\n");
    
    const char *simple_xml = "<root>Hello</root>";
    
    printf("解析XML: %s\n", simple_xml);
    
    xml_document_t *doc = xml_parse_string(simple_xml);
    if (doc) {
        printf("解析成功!\n");
        if (doc->root) {
            printf("根节点名称: %s\n", doc->root->name ? doc->root->name : "NULL");
            printf("根节点内容: %s\n", doc->root->content ? doc->root->content : "NULL");
        } else {
            printf("根节点为空!\n");
        }
        xml_free_document(doc);
    } else {
        printf("解析失败!\n");
    }
    
    return 0;
}